package com.team6.cet;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
@ServletComponentScan
public class Team6CetApplication  extends SpringBootServletInitializer {
 
	 @Autowired  
	 DataSource dataSource;  
	public static void main(String[] args) {
		SpringApplication.run(Team6CetApplication.class, args);
	}
	
	  @Override
	  protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
	              return application.sources(Team6CetApplication.class);
	          }

	/** 
     * 查看用了什么数据库连接池 
     */  
    public void run(String... args) throws Exception {  
        System.out.println("DATASOURCE = " + dataSource);  
    }  
}
